/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package earthdawnnet.events.server;

import earthdawnnet.server.IEarthdawnServer;

/**
 *
 * @author Andreas Franek
 */
public class RollEvent extends ServerEvent
{
    private int step;
    private boolean rollAgainst;
    private int against;
    
    public RollEvent(int step)
    {
        this.step = step;
        rollAgainst = false;
        against = 0;
    }
    
    public RollEvent(int step, int against)
    {
        this.step = step;
        rollAgainst = true;
        this.against = against;
    }

    @Override
    public void apply(IEarthdawnServer eds)
    {
        eds.roll(getSender(), step, rollAgainst, against);
    }

    @Override
    public String getEventName()
    {
        throw new UnsupportedOperationException("Not supported yet.");
    }
    
}
